# Contributor: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=aquamarine
pkgver=0.4.2
pkgrel=0
pkgdesc="Aquamarine is a very light linux rendering backend library"
url="https://github.com/hyprwm/aquamarine"
arch="all"
license="BSD-3-Clause"
source="
	https://github.com/hyprwm/aquamarine/archive/v$pkgver/aquamarine-v$pkgver.tar.gz
	use-legacy-libgl.patch
	"
makedepends="
	cmake
	eudev-dev
	hwdata-dev
	hyprutils-dev>=0.1.5
	hyprwayland-scanner>=0.4.0
	libdisplay-info-dev
	libinput-dev
	libseat-dev
	mesa-dev
	pixman-dev
	wayland-dev
	wayland-protocols
	"
subpackages="$pkgname-doc $pkgname-dev"
options="!check" # tests are broken

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}


sha512sums="
e5a663e2fbc975601a9e70a05a2ea1a0fcb98762cd6a8d86631e43cc84174d2f11d69ae38c53e80bcb447e687aca74a6a9a8430a75b77c9c9569cf0de684a57e  aquamarine-v0.4.2.tar.gz
4a5a99577deabca2f3748a30bc6d97c0582a3b18e0d9d1c2a9f7cba8db2c8aa571a458574e4586f6ef70889e059d5f129a997c8c04880dddccbc26d4c0b67627  use-legacy-libgl.patch
"
